package course;

public class Demo {
    public static void main(String[] args) {
        Course mathCourse = new Course("MATH101", "数学", 2);
        Course englishCourse = new Course("ENG102", "英语", 1);

        Student student1 = new Student("001", "Alice");
        Student student2 = new Student("002", "Bob");

        student1.selectCourse(mathCourse); // Alice 选课成功：数学
        student2.selectCourse(mathCourse); // Bob 选课成功：数学

        student2.selectCourse(englishCourse); // Bob 选课成功：英语
        student1.selectCourse(englishCourse); // Alice 选课失败：课程人数已满，无法选课
    }
}
